<{include file="public_html/header.html"}>
<{include file="public_html/left_menu.html"}>
<div id="content" class="span10">
	<!-- content starts -->
	<div>
		<ul class="breadcrumb">
			<li>
				<a href="javascript:;"><{$action}></a>
			</li>
		</ul>
	</div>
	
	<div class="row-fluid sortable">		
		<div class="box span12">
			<div class="box-header well" data-original-title>
				<h2><{$action}></h2>
			</div>
			<div class="box-content">
				<form class="form-horizontal" method="post" action="<{$current_url}>">
					<label><input type="text" placeholder="请输入名称" name="search" value="<{if $data['search']}><{$data['search']}><{/if}>" aria-controls="DataTables_Table_0">
					  		<select name="cid" id="cid"  autocomplete="off">
									<option value="0">全部分类</option>
									<{foreach key=key from=$cate_list item=citem}>
									<option value="<{$citem.id}>" <{if isset($data['cid']) AND $citem.id == $data['cid']}> selected<{/if}>><{$citem.name}></option>
							  		<{/foreach}>
						  	</select>
						<button type="submit" class="btn btn-primary">搜索</button>
						
					</label>
				</form>
				<form class="form-horizontal" method="post" action="/<{$current_class}>/update_sorts" delete_action="/<{$current_class}>/delete">
				<table class="table table-striped table-bordered bootstrap-datatable datatable">
                        <colgroup>
                            <col width="80"/>
                            <col width="" />
                            <col width="" />
                            <col width="" />
                            <col width="" />
                            <col width="" />
                        </colgroup>
				  	<thead>
					  	<tr>
						  	<th>ID</th>
						  	<th>名称</th>
						  	<th>分类</th>
						  	<th>排序</th>
						  	<th>添加日期</th>
						  	<th>操作</th>
					  	</tr>
				  	</thead>   
				  	<tbody>
				  	<{foreach from=$list item=item}>
					  	<tr>
					  		<td class="center">
					  			<label class="checkbox inline">
									<input type="checkbox" name="ids[]" value="<{$item['id']}>"> <{$item['id']}>
								</label>
					  		</td>
					  		<td class="center"><a href="<{$manage_application_list['kuplay'].domain}>/<{$current_class}>/index/<{$item.app_cid}>/<{$item.engine_id}>/<{$item['id']}>" target="_blank"><{$item['name']}></a></td>
				  			<td class="center">
				  				<{$cate_list[$item['cid']]['name']}>
				  			</td>
				  			<td class="center"><input style="width:40px;" name="sort[<{$item['id']}>]" maxlength="4" type="text" value="<{$item['sort']}>" onkeyup="this.value=this.value.replace(/\D/g,'')" onafterpaste="this.value=this.value.replace(/\D/g,'')" /></td> 
					  		<td class="center"><{$item['add_time']|date_format:'%Y-%m-%d %H:%M:%S'}></td>
					  		<td class="center">
								<a class="btn btn-success" href="/<{$current_class}>/view/<{$item['id']}>">
									<i class="icon-zoom-in icon-white"></i>  
									查看                                            
								</a>
								<a class="btn btn-info edit_link" href="/<{$current_class}>/edit/<{$item['id']}>" target="_blank">
									<i class="icon-edit icon-white"></i>  
									编辑                                            
								</a>
								<a class="btn btn-danger delete_data" href="/<{$current_class}>/delete/<{$item['id']}>">
									<i class="icon-trash icon-white"></i> 
									删除
								</a>
							</td>
					  	</tr>
				  	<{/foreach}>
				  	<{if $list|count eq 0}>
				  		<tr>
					  		<td class="center" style=" height:120px; text-align:center;line-height:120px;" colspan="8">
								暂无数据！
							</td>
					  	</tr>
				  	<{/if}>
				  	<tr>
						<td class="center" colspan="6">
							<input type="button" class="btn" value="全/反选" id="checkall">
							<input id="delete" class="btn" type="button" name="delete" value="批量删除">
							<input type="submit" class="btn btn-primary" name="update" value="提 交">
						</td>
					</tr>
			  		</tbody>
			  	</table>    
			  	</form> 
			  	<div class="row-fluid">
			  		<div class="span12 center">
				  		<div class="dataTables_paginate paging_bootstrap pagination">
				  			<{$pagination}>
				  		</div>
			  		</div>
			  	</div>       
			</div>
		</div><!--/span-->
	</div>
	</div><!--/row-->
</div><!--/row-->
<{include file="public_html/footer.html"}>